//
//  Functions.m
//  OrderSeat
//
//  Created by 王威 on 13-10-27.
//  Copyright (c) 2013年 wangwei. All rights reserved.
//

#import "Functions.h"

@implementation Functions

+ (float)getDistance:(CLLocation *)my to:(CLLocation *)to
{
    CLLocation *myLocation = [[CLLocation alloc] initWithLatitude:my.coordinate.latitude
                                                longitude:my.coordinate.longitude];
    CLLocation *toLocation = [[CLLocation alloc] initWithLatitude:to.coordinate.latitude
                                                longitude:to.coordinate.longitude];
   

    CLLocationDistance kilometers = [myLocation distanceFromLocation:toLocation]/1000;
    return kilometers;
}


+ (void)disabledDelaysContentTouches:(UITableViewCell*)cell
{
    for (id obj in cell.subviews)
    {
        if ([NSStringFromClass([obj class]) isEqualToString:@"UITableViewCellScrollView"])
        {
            UIScrollView *scroll = (UIScrollView *) obj;
            scroll.delaysContentTouches = NO;
            break;
        }
    }
}


@end
